<template>
	<!-- 我的页面头部详情信息 -->
	<div class="entirety">
		<van-row style="padding: 0.625rem;">
			<van-col span="2" offset="19">
				<van-icon name="service-o" size="25" />
			</van-col>
			<van-col span="3">
				<van-icon name="setting-o" size="25" @click="management" />
			</van-col>
		</van-row>
		<div>
			<van-row v-if="user">
				<van-col span="6" offset="1">
					<van-image width="100" height="100" :lazy-load="true" :round="true" :src="user.headerImg" />
				</van-col>
				<van-col span="12" offset="2">
					<van-row style="margin-top: 3vh;">
						<van-col span="24" style="text-align: left;">
							<h2>{{user.nickName}}</h2>
						</van-col>
						<van-col span="24" style="margin-top: 3vh;text-align: left;">{{user.createTime}}</van-col>
					</van-row>
				</van-col>
				<van-col span="3" style="margin-top: 5vh;">
					<van-icon name="arrow" size="30" />
				</van-col>
			</van-row>
			<van-row v-else>
				<van-col span="6" offset="2">
					<van-image width="100" height="100" :lazy-load="true" :round="true"
						src="https://img01.yzcdn.cn/vant/cat.jpeg" @click="images" />
				</van-col>
				<van-col span="12" offset="1" style="text-align: left;">
					<van-row style="margin-top: 3vh;">
						<van-col span="24">
							<h2>12345</h2>
						</van-col>
						<van-col span="24" style="margin-top: 3vh;">span: 8</van-col>
					</van-row>
				</van-col>
				<van-col span="3" style="margin-top: 5vh;">
					<van-icon name="arrow" size="30" />
				</van-col>
			</van-row>
		</div>
		<van-row style="margin-top: 4vh;">
			<van-col span="8">
				<van-row>
					<van-col span="24" class="align"><b>68</b></van-col>
					<van-col span="24" class="align">关注</van-col>
				</van-row>
			</van-col>
			<van-col span="8">
				<van-row>
					<van-col span="24" class="align"><b>0</b></van-col>
					<van-col span="24" class="align">粉丝</van-col>
				</van-row>
			</van-col>
			<van-col span="8">
				<van-row @click='collect'>
					<van-col span="24" class="align"><b>85</b></van-col>
					<van-col span="24" class="align">收藏</van-col>
				</van-row>
			</van-col>
		</van-row>
	</div>

</template>

<script>
	import {
		mapGetters
	} from 'vuex'
	export default {
		data() {
			return {
				user: [],
				http: 'https://img.9lele.com',
			}
		},
		computed: {
			...mapGetters([
				'leftreact'
			])
		},
		created() {
			console.log(this.leftreact, "噢噢噢噢")
			let user = JSON.parse(localStorage.getItem("user"));
			this.user = user
			console.log(user, '登录user')
		},
		methods: {
			images() {
				this.$router.push('/UserLogin')
			},
			management() {
				this.$router.push('/UserAdministration')
			},
			// 收藏
			collect(){
				this.$router.push('/collect')
			}
		}
	}
</script>

<style>
	.entirety {
		width: 100%;
		height: 15.5rem;
		background-color: #000;
		color: #fff;
	}

	.align {
		text-align: center;
		height: 5vh;
	}

	b {
		font-size: 1.3125rem;
	}
</style>
